<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<html>
<head>
    <title>
        PIM
    </title>
    <link rel="stylesheet" type="text/css" href="<c:url value="/css/style.css"/>">
</head>
<body>

<table align="center" border="0" cellspacing="0">
    <tr>
        <td>
            <%@include file="/WEB-INF/inc/header.jsp" %>
        </td>
    </tr>

    <tr bgcolor="#ffffff" height="800" align="center">
        <td>


            <form:form method="Post" action="register" commandName="person">

                Регитрация
                <br>
                <br>
                <table>

                    <tr>

                        <td><spring:message code="field.fname"/>
                        </td>
                    </tr>

                    <tr>
                        <td><form:input path="fname"/></td>
                    </tr>

                    <tr>
                        <td>
                            <form:errors
                                    path="fname" class="error"/>
                        </td>
                    </tr>

                    <tr>

                        <td><spring:message code="field.sname"/></td>
                    </tr>
                    <tr>
                        <td><form:input path="sname"/></td>
                    </tr>

                    <tr>
                        <td>
                            <form:errors
                                    path="sname" class="error"/>
                        </td>
                    </tr>

                    <tr>

                        <td><spring:message code="field.tname"/></td>
                    </tr>
                    <tr>
                        <td><form:input path="tname"/></td>
                    </tr>
                    <tr>
                        <td>
                            <form:errors
                                    path="tname" class="error"/>
                        </td>
                    </tr>


                    <tr>

                        <td><spring:message code="field.group"/></td>
                    </tr>
                    <tr>
                        <td>
                            <form:select path="group.id">
                                <form:options items="${groupList}" itemValue="Id" itemLabel="name"/>
                            </form:select>
                        </td>
                    </tr>


                    <tr>

                        <td><spring:message code="field.email"/></td>
                    </tr>
                    <tr>
                        <td><form:input path="email"/></td>
                    </tr>

                    <tr>
                        <td>
                            <form:errors
                                    path="email" class="error"/>
                        </td>
                    </tr>


                    <tr>

                        <td><spring:message code="field.password"/></td>
                    </tr>
                    <tr>
                        <td><form:password path="password"/></td>
                    </tr>

                    <tr>
                        <td>
                            <form:errors
                                    path="password" class="error"/>
                        </td>
                    </tr>


                    <tr>

                        <td align="center"><input type="submit" class="button"
                                                  value="<spring:message code="button.register"/>"/></td>

                    </tr>


                </table>

            </form:form>

        </td>
    </tr>

    <tr>
        <td>
            <%@include file="/WEB-INF/inc/footer.jsp" %>
        </td>
    </tr>

</table>

</body>


</html>